Conversation
* Introduced `proposal_include_after_restart_max_timeout_sec` to `ShastaConfig` and `NodeConfig`. * Implemented timeout logic in the transaction waiting process to enhance transaction handling.
There was a problem hiding this comment.
Pull request overview
Adds a configurable timeout to the Shasta node startup wait that blocks on previously-sent L1 transactions being executed, preventing indefinite startup hangs after restart.
Changes:
- Add a timeout to
Node::wait_for_sent_transactions()with a warning + “proceed anyway” behavior. - Introduce
proposal_include_after_restart_max_timeout_secconfig plumbed from env (PROPOSAL_INCLUDE_AFTER_RESTART_MAX_TIMEOUT_SEC) intoNodeConfig. - Bump workspace crate versions from
1.33.5to1.34.0(and update lockfile entries).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
shasta/src/node/mod.rs |
Adds elapsed-time tracking and timeout break condition while waiting for nonce latest/pending to converge. |
shasta/src/node/config.rs |
Extends NodeConfig with the new timeout field. |
shasta/src/lib.rs |
Wires the new Shasta config value into NodeConfig during node creation. |
shasta/src/config/mod.rs |
Reads the new env var with a default and includes it in Display output. |
Cargo.toml |
Bumps workspace package version to 1.34.0. |
Cargo.lock |
Updates crate versions in the lockfile to 1.34.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if start.elapsed().as_secs() >= timeout_sec { | ||
| warn!( | ||
| "Waiting for sent transactions exceeded timeout of {}s (Nonce Latest: {}, Nonce Pending: {}). Proceeding anyway.", | ||
| timeout_sec, nonce_latest, nonce_pending | ||
| ); |
There was a problem hiding this comment.
The timeout check uses start.elapsed().as_secs() and a fixed 6s poll interval, so the effective wait can exceed *_max_timeout_sec by up to ~6 seconds and will overshoot small timeouts (e.g., 1–5s). Consider comparing elapsed() against Duration::from_secs(timeout_sec) and sleeping for min(poll_interval, remaining_time) (or using tokio::time::timeout) to respect the configured maximum more precisely.
|
Not relevant, as fees might be to high while replacing again, we need a fix on L1 node side |
No description provided.